#include <stdio.h>
#include <stdlib.h>
int *init(void)
{
    int *p = (int *)malloc(sizeof(int));
    return p;
}

void free_p(int* *p)
{
    free(*p);
    *p = NULL;
}

int main(int argc, char const *argv[])
{
    int num = 10;
    int *p = init();

    *p = 50;
    printf("%p %d\n", p, *p);
    p = NULL;
    //free_p(&p); // 释放指针指向的内存，并将指针置为NULL
    printf("%p \n", p);
}